



************
*Analysis  for ``Learning to Love Government? Technological Change and the Political Economy of Higher Education''
***** Appendix E. Additional empirical evidence 
******Journal of Politics




///Install packages
clear
ssc install krls, replace
ssc install maptile, replace
ssc install ivreg2, replace
set scheme s2color, permanently


///Starting with home directory Learning to love JOP data/
//If needed cd "~/Learning to love JOP data/"
//If needed cd ../..

****Colorado referenda

use "Data/ColoradoReferendaData.dta", clear

cd "Output/4Additionalempirical"

log using "4Log.smcl", replace


 krls forspending20051992 l_sh_routine33a_logtotalrev90imp  
  predict Forspending_KRLS
  
  twoway (scatter forspending20051992 l_sh_routine33a_logtotalrev90imp, sort) ///
    (line Forspending_KRLS l_sh_routine33a_logtotalrev90imp, sort), graphregion(color(white)) xtitle(Routine Share X HE investment) leg(off)
  
  
graph export "ColoradoSupport.png", replace


drop Forspending_KRLS
	
	
	********Wisconsin
	
cd ../..
	
use "Data/WisconsinBadgerpoll.dta", clear

cd "Output/4Additionalempirical"
	
	
	global controls nonwhite conservative moderate collegegrad
  
  
   logit higherhepriority  c.l_sh_routine33a##c.logtotalrev90imp  l_shind_manuf_cbp l_sh_popedu_c  l_sh_popfborn l_sh_empl_f    popdensity $controls,r
 
  
 quietly margins , dydx(l_sh_routine33a) at(logtotalrev90imp=(0(2)10)) vsquish

 marginsplot , graphregion(color(white)) 
 
 
 graph export "WisconsinPriority.png", replace
 
 
 ************Survey on cities
 cd ../..
 
 use "Data/msa_survey_indiv_merged.dta", clear
 
 
 cd "Output/4Additionalempirical"
 
 
 //Figure E.3 on Building ladders. Support for “building ladders” as a policy strategy to deal with technological changes (IV LP models with number of institutions in 1950s as instrument for HE invest- ments)
 *1950s
     ivregress 2sls buildladders ( c.l_sh_routine33a#c.logtotalrev90imp  l_sh_routine33a logtotalrev90imp  = countyinst100nottier1 R33a_1950_2000 R33a_1950_1990  c.R33a_1950_2000#c.countyinst100nottier1 c.R33a_1950_1990#c.countyinst100nottier1  )   l_shind_manuf_cbp l_sh_popedu_c  l_sh_popfborn l_sh_empl_f    popdensity i.state ///
 female age3150 age5165 agegt65 above_hs_educ university_educ black latino income  [pweight=weight], r
eststo
	 quietly margins , dydx(l_sh_routine33a) at(logtotalrev90=(0(2)10)) vsquish

   marginsplot , graphregion(color(white)) 
   
   graph export "CitiesBuildingladders.png", replace
   	
 
 
	///Figure E.4: ME of log routine exposure on trust in State Universities (linear model, 1-4)
    reg  trust_StateUniv c.l_sh_routine33a##c.logtotalrev90imp  l_shind_manuf_cbp l_sh_popedu_c  l_sh_popfborn l_sh_empl_f    popdensity i.state, r 
 quietly margins , dydx(l_sh_routine33a) at(logtotalrev90=(0(2)10)) vsquish
marginsplot , graphregion(color(white)) 
   

graph export "CitiesTruststateUnis.png", replace


//Figure E.5: ME of log routine exposure on trust in State Governments (linear model, 1-4)
	 reg trust_stategov c.l_sh_routine33a##c.logtotalrev90imp  l_shind_manuf_cbp l_sh_popedu_c  l_sh_popfborn l_sh_empl_f  , r 
 quietly margins , dydx(l_sh_routine33a) at(logtotalrev90=(0(2)10)) vsquish
marginsplot , graphregion(color(white))

 
graph export "CitiesTruststategov.png", replace

log close

///END
	
	
	
	
	
